package org.fatmansoft.teach.Repository.ViewRepository;

import org.fatmansoft.teach.entity.ViewEntity.Course;
import org.fatmansoft.teach.entity.ViewEntity.Student;
import org.fatmansoft.teach.entity.ViewEntity.StudentCourse;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StudentCourseRepository extends JpaRepository<StudentCourse, Integer> {
    List<StudentCourse> findStudentCourseByStudentId(Integer studentNum);

    List<StudentCourse> findAllByStudent(Student student);

    List<StudentCourse> findAllByStudentId(Integer studentId);

    List<StudentCourse> findAllByCourse(Course course);
}
